/*
 * edge.cpp
 *
 *  Created on: 10.10.2011
 *      Author: duke
 */

#include <iostream>
#include "edge.h"

using namespace std;

edge::edge(int node1, int node2) {
	this->node1 = node1;
	this->node2 = node2;
	this->color = 0;
}

void edge::setColor(int color) {
	this->color = color;
}

int edge::getColor() {
	return this->color;
}

int edge::getNode1() {
	return this->node1;
}

int edge::getNode2() {
	return this->node2;
}

void edge::print() {
	if (this->node1 <= this->node2) {
		cout << "edge " << this->node1 << "<--->" << this->node2 << " ,color "
				<< this->color << endl;
	} else {
		cout << "edge " << this->node2 << "<--->" << this->node1 << " ,color "
				<< this->color << endl;
	}
}
